<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<script src="interface.js"></script>
<script>
// Embeds an iframe containing options.html in the popup.
function openOptions() {
  var a = document.getElementById("options_link");
  var iframe = document.getElementById("options_iframe");
  a.style.display = "none";
  iframe.setAttribute("src", chrome.extension.getURL("options.html"));
  iframe.style.display = "block";
}

function closeOptions() {
  var a = document.getElementById("options_link");
  var iframe = document.getElementById("options_iframe");
  a.style.display = "block";
  iframe.style.display = "none";
}
</script>
</head>
<body onload="installInterface()">
<div id="interface"></div>
<div id="options_link"><a href="javascript://" onclick="openOptions()">Options</a></div>
<iframe id="options_iframe"></iframe>
</body>
<script>
if (localStorage["enable_logging"] == "enabled") {
  var a = document.createElement("a");
  a.setAttribute("href", "eventlog.html");
  a.innerHTML = "eventlog";
  var container = document.getElementById("options_link");
  container.appendChild(document.createElement("br"));
  container.appendChild(a);
}
</script>
</html>
